package com.foreveross.framework.example.tags.controller;

import com.foreveross.framework.example.tags.domain.Customer;
import com.foreveross.framework.example.tags.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class SelectController {

  @Autowired
  private CityService cityService;

  @RequestMapping(value = "/example/select", method = RequestMethod.GET)
  public String execute(ModelMap modelMap) {
    Customer customer = new Customer();
    customer.setCity("sz");

    modelMap.addAttribute("customer", customer);
//    modelMap.addAttribute("cities", cityService.findCities());

    return "example/select";
  }

}
